package com.qingzhuge.member.dao;

import com.qingzhuge.dao.BasePkLongDao;
import com.qingzhuge.member.entity.SysMemberThirdPartyAuth;
import com.qingzhuge.member.enums.EnumThirdOauthType;

import java.util.List;

/**
 * @author : zero.xiao
 * @description : 会员-第三方应用
 * @date :2018/6/12 0012 下午 17:22
 * @modified :
 * @since : 1.0.0
 */
public interface SysMemberThirdOauthDao extends BasePkLongDao<SysMemberThirdPartyAuth> {

    SysMemberThirdPartyAuth findByOpenId(String openId);

    List<SysMemberThirdPartyAuth> findByUserId(Long uid);

    List<SysMemberThirdPartyAuth> findByUnionId(String unionId);

    SysMemberThirdPartyAuth findByOpenIdAndUserId(String openId, Long uid);

    SysMemberThirdPartyAuth findByTypeAndOpenId(EnumThirdOauthType type, String openId);

    SysMemberThirdPartyAuth findByTypeAndUserId(EnumThirdOauthType type, Long uid);
}
